#pragma once

#ifdef GK_DEVICE_DIRECTX9

#include "GkBuffer.h"

namespace gk
{
	struct ConstantBufferInternal
	{
		enum Type
		{
			Texture,
			Float,
			Int,
			Bool,
		};

		struct FloatRegister
		{
			float				v[4];
		};

		struct IntRegister
		{
			int					v[4];
		};

		struct BoolRegister
		{
			BOOL				v;
		};

		struct TextureRegister
		{
			LPDIRECT3DTEXTURE9	v;
		};

		union 
		{
			FloatRegister*		m_floats;
			IntRegister*		m_ints;
			BoolRegister*		m_bools;
			TextureRegister*	m_textures;
		};

		cr::HashedString		m_type;
		cr::uint32_t			m_startRegister;
		cr::uint32_t			m_registerCount;
	};
}

#endif // GK_DEVICE_DIRECTX9
